:root {
  --color-light-white: #ffffff;
  --color-light-green: #b7d8a7;
  --color-dark-green: #70856d;
  --color-brown: #c49166;
  --color-light-yellow: #fdf9e1;
}

/* ========== RESET & BODY ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Lato', sans-serif;
}

body {
  line-height: 1.6;
  background-color: var(--color-light-white);
  color: var(--color-dark-green);
  overflow-x: hidden;

  background-image: url('img/teksturBatik.png');
  background-repeat: repeat;
  background-size: 100px;
  overflow-x: hidden !important;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 8px;
  transform: translateX(-50%);
  left: 20px;
  right: 20px;
  height: 60px;
  width: auto;
  background-color: var(--color-light-yellow);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 60px;
  justify-content: space-between;
}

.nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand .logo {
  height: 40px;
  width: 28px;
  margin-right: 0px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-text .village-name {
  font-size: 19px;
  font-weight: bold;
  color: #333;
  margin-left: 20px;
  margin-bottom: 2px; /* Beri sedikit jarak agar tidak terlalu mepet */
  line-height: 1; /* Atur tinggi baris */
}

.brand-text .regency-name {
  font-size: 16px;
  color: #555;
  margin-left: 20px;
  margin-top: 0;
  line-height: 1;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: black;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

/* Style untuk link navbar yang sedang aktif */
.nav-links a.active {
  font-weight: bold;
  /* Anda juga bisa menambahkan style lain, misalnya warna */
  color: var(--color-brown);
}

.nav-links a:hover {
  color: black;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 50%, white 50%, white 100%), url('img/utama_tembakau.jpg') center top / cover no-repeat;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  color: white;
  text-align: center;
  padding: 0 20px;
}

.hero-content {
  position: relative;
  z-index: 2;
  margin-top: 5%;
}

.hero-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: white;
}

/* Carousel */
.carousel-container {
  overflow-x: auto;
  padding: 20px 0;
  z-index: 2;
  scroll-snap-type: x mandatory;
}

.carousel-track {
  display: flex;
  gap: 20px;
  padding: 0 20px;
}

.carousel-item {
  flex-shrink: 0;
  overflow: hidden;
  scroll-snap-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-item.small {
  width: 250px;
  height: 250px;
  margin-top: 25px;
}

.carousel-item.medium {
  width: 270px;
  height: 270px;
}

.carousel-item.large {
  width: 300px;
  height: 300px;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-desc {
  max-width: 800px;
  text-align: center;
  color: black;
  background: rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 8px;
  margin-top: 5px;
  z-index: 2;
}

/* ========== SECTION ========== */
.section {
  padding: 20px 20px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
  border-radius: 8px;
}

.section h2 {
  margin-bottom: 40px;
  font-size: 2rem;
}

/* Visi Misi Card */
.card-container {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.section#visi-misi {
  /* background-color: var(--color-light-green); */
  border-radius: 8px;
  max-width: 95%;
  margin: 20px auto;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
  text-align: center;
}

.card {
  flex: 1;
  min-width: 250px;
  background: var(--color-light-yellow);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#visi-misi h3 {
  text-align: center;
  margin-bottom: 10px;
}

#visi-misi .card ul {
  text-align: left;
  margin-left: 20px;
}

/* Deskripsi Desa Section */
.deskripsi-section {
  background-color: rgba(255, 255, 255, 0);
  padding: 10px 20px;
  max-width: 1000px;
  margin: auto;
}

.deskripsi-card {
  display: flex;
  align-items: center;
  gap: 50px;
  background-color: var(--color-brown);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.deskripsi-text {
  flex: 2;
  text-align: left;
  color: var(--color-light-white);
}

.deskripsi-text h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.deskripsi-text p {
  margin-bottom: 10px;
}

.selengkapnya {
  color: var(--color-light-white);
  font-weight: bold;
  text-decoration: none;
}

.selengkapnya:hover {
  color: var(--color-dark-green);
}

.deskripsi-img {
  flex: 1;
}

.deskripsi-img img {
  width: 100%;
  border-radius: 8px;
}

/* Sejarah & Budaya Section */
.sejarah-budaya-section {
  /* background-color: var(--color-light-yellow); */
  border-radius: 8px;
  max-width: 95%;
  margin: 20px auto;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
  text-align: center;
}

.sejarah-budaya-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.budaya-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  width: 100%;
  background-color: var(--color-light-green);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sejarah-card h3,
.budaya-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #333;
}

.sejarah-card img,
.budaya-card img {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: cover;
  display: block;
}

.sejarah-card p,
.budaya-card p {
  text-align: center;
  margin-bottom: 15px;
}

.tokoh {
  text-align: center;
  font-weight: reguler;
}

.detail-text {
  list-style-type: disc; /* tetap pakai titik bulat */
  list-style-position: inside; /* bullet sejajar sama teks */
  padding-left: 20px; /* atur jarak masuk dari paragraf biasa */
}

.detail-text li {
  margin-bottom: 8px; /* jarak antar poin */
  text-align: justify; /* biar rapi kiri-kanan */
}

.btn-selengkapnya {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--color-brown);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.btn-selengkapnya:hover {
  background-color: #70856d;
}

/* Struktur Kepengurusan */
.struktur-card-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.struktur-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.profile-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.struktur-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

/* UMKM Section */
.umkm-section {
  /* background-color: var(--color-light-green); */
  border-radius: 8px;
  max-width: 95%;
  margin: 20px auto;
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
  text-align: center;
}

.umkm-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.umkm-card {
  width: 100%;
  max-width: 300px;
  background-color: var(--color-light-green);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  position: relative; /* Wajib ada agar link bisa meregang */
  cursor: pointer;
}

.umkm-card:hover {
  transform: translateY(-5px) !important;
}

.umkm-card .umkm-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.umkm-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.umkm-content {
  padding: 15px;
  text-align: left;
}

.umkm-content h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: #333;
}

.umkm-content p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

.umkm-link {
  color: var(--color-brown);
  text-decoration: none;
  font-weight: bold;
}

.umkm-link:hover {
  color: var(--color-dark-green);
}

.page-container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: start;

  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
}

.page-with-side-button {
  max-width: 900px;
  margin: 40px auto;

  /* PENTING: Jadikan ini sebagai acuan untuk tombol */
  position: relative;
}

.back-button-side {
  position: sticky;
  top: 100px;

  left: -80px;

  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid #dee2e6;
  border-radius: 50%;
  background-color: #fff;
  color: #333;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.back-button-side:hover {
  background-color: #f8f9fa;
  transform: scale(1.1);
}

/* Peta Desa */
.peta-section {
  background-color: var(--color-light-white);
}

.map-placeholder {
  width: 100%;
  height: 350px;
  background-color: var(--color-dark-green);
  border: 1px solid #ddd;
  border-radius: 8px;
}

.map-container {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

/* ========== STYLE HALAMAN UMKM ========== */
.umkm-video-section {
  padding: 20px 20px;
  background-color: #fdf9e1;
  text-align: center;
  border-radius: 8px;
}

.video-item {
  width: auto;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-item img {
  width: 100%;
  display: block;
}

.video-responsive-container {
  position: relative;
  padding-top: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-responsive-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.umkm-products-section {
  padding: 60px 20px;
  background-color: #ffffff;
  text-align: center;
}

.umkm-products-section h2 {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.umkm-products-section > p {
  color: #666;
  margin-bottom: 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  justify-content: center;
}

.product-card {
  background-color: #fdf9e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit; /* ini bikin teks ikut warna default parent */
}

.product-card .product-name {
  color: #333; /* atur ke warna yang kamu mau, contoh hitam */
  text-decoration: none; /* biar underline hilang */
}

.product-card:hover .product-name {
  color: #666; /* opsional: warna pas hover */
}

.product-image {
  width: 100%;
  height: 200px;
  background-color: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-name {
  font-weight: bold;
}

.product-price {
  color: #8b4513;
}

/* ========== STRUKTUR.HTML CSS ========== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Lato', sans-serif;
  color: #333;
}

.main-content-profile {
  font-family: 'Lato', sans-serif;
  color: #333;

  background-color: var(--color-light-white);
  padding: 10px 20px;
  max-width: 1200px;
  margin: auto;
}

.page-header {
  padding-top: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

.page-header p {
  font-size: 18px;
  color: #666;
}

/* Style untuk pembungkus/container */
.chart-container {
  width: 100%;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  border: 2.5px dashed #ccc;
  border-radius: 8px;
}

/* Style KHUSUS untuk gambar */
.org-chart-image {
  width: 100%; /* Membuat gambar responsif */
  height: auto;
  display: block; /* ✅ Ini akan menghilangkan celah kecil misterius di bawah gambar */
}

.officials-section,
.staff-section {
  margin-bottom: 40px;
}

.officials-section h2,
.staff-section h2 {
  font-size: 28px;
  margin-bottom: 5px;
}

.officials-section > p {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
}

.head-official-container {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  padding: 20px;
  border-radius: 20px;
  background: var(--color-light-yellow);
  padding-left: 50px;
}

.welcome-speech {
  flex: 2;
  background-color: transparent;
  border-left: 4px solid var(--color-brown);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.welcome-speech p {
  text-align: justify;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.official-card-kades .profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 15px auto;
  object-fit: cover;
  margin-top: 25px;
}

.official-card-kades .name {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.official-card-kades .title {
  text-align: center;
  font-size: 14px;
  color: #777;
}

.official-card .profile-picture {
  width: 120px;
  height: 120px;
  background-color: #e0e0e0;
  border-radius: 50%;
  margin: 0 auto 15px auto;
  object-fit: cover;
}

.official-card .name {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.official-card .title {
  text-align: center;
  font-size: 14px;
  color: #777;
}

/* ========== HALAMAN BUDAYA ========== */
.budaya-hero {
  background: url('img/bg_budaya.jpg') center/cover no-repeat;
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  color: white;
  text-align: center;
  padding: 0 20px;
  margin-bottom: 40px;
}

.budaya-hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.budaya-hero h1 {
  font-size: 2.5rem;
  z-index: 2;
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.budaya-section {
  padding: 40px 20px;
  background-color: white;
}

.budaya-container {
  max-width: 1200px;
  margin: 0 auto;
}

.card-block-wrapper {
  background-color: var(--color-dark-green);
  padding: 50px;
  border-radius: 6px;
  margin: 0 auto 30px auto;
  max-width: 1000px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative; /* Ini wajib agar ::after bisa meregang */
  cursor: pointer;
  transition: transform 0.3s ease;
}

.selengkapnya::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; /* Pastikan lapisan link ada di atas konten lain */
}

.card-block-wrapper:hover {
  transform: translateY(-5px) !important; /* Gunakan !important jika ada konflik dengan AOS */
}

.content-card {
  background-color: white;
  color: black;
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.content-card h2 {
  font-size: 1.75rem;
  margin-bottom: 15px;
  text-align: center;
  color: black;
}

.content-card p {
  margin-bottom: 15px;
  text-align: center;
  line-height: 1.6;
}

.content-card .selengkapnya {
  display: inline-block;
  color: black;
  font-weight: bold;
  text-decoration: none;
  margin-top: 10px;
}

.image-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.image-item {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.image-item.small {
  width: 140px;
  height: 150px;
  margin-top: 10px;
}

.image-item.large {
  width: 160px;
  height: 170px;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========== HALAMAN SEJARAH ========== */
.sejarah-hero {
  background: url('img/1.jpg') center/cover no-repeat;
  height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  color: white;
  text-align: center;
  padding: 0 20px;
}

.sejarah-hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.sejarah-hero h1 {
  font-size: 2.5rem;
  z-index: 2;
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.sejarah-hero h4 {
  font-size: 1rem;
  z-index: 2;
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.sejarah-section {
  background-color: var(--color-light-white);
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;

  background-image: url('img/teksturBatik.png');
  background-repeat: repeat;
  background-size: 100px;
}

.sejarah-card {
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--color-light-green);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 40px;
  position: relative; /* Ini Wajib! */
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

/* 2. Perluas area klik link */
.read-more::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; /* Pastikan lapisan link ada di atas */
}

.sejarah-card:hover {
  transform: translateY(-5px) !important; /* Card akan sedikit terangkat */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Bayangan lebih jelas */
}

.sejarah-card.reverse {
  flex-direction: row-reverse;
}

.sejarah-card .card-text {
  flex: 1;
}

.sejarah-card .card-text h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: left;
  color: black;
}

.sejarah-card .card-text p {
  margin-bottom: 20px;
  text-align: left;
  color: black;
}

.sejarah-card .read-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--color-dark-green);
  font-weight: bold;
  text-decoration: none;
}

.sejarah-card .card-image {
  flex: 1;
  width: max-content;
  height: max-content;
}

.sejarah-card .placeholder-image {
  width: 400px;
  height: 300px;
  background-color: #dcdcdc;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 auto; /* biar tetap center */
}

.sejarah-card .placeholder-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* biar penuh tanpa menyusut */
  display: block;
}

/* ========== ARTIKEL SEJARAH DAN BUDAYA ========== */
.main-content {
  max-width: 1000px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 80px;
  margin-bottom: 40px;
}

.detail-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.detail-image-carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
}

.carousel-image {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding-top: 50%;
  background-color: #ffffff;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.carousel-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 24px;
  border-radius: 5px;
  user-select: none;
  transition: background-color 0.3s;
}

.carousel-nav:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-nav.prev {
  left: 10px;
}

.carousel-nav.next {
  right: 10px;
}

.detail-content {
  max-width: 800px;
  padding: 0 20px;
  text-align: left;
}

.detail-title {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.detail-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

.info-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #777;
  font-size: 0.9rem;
}

.info-item img {
  height: 18px;
}

.info-item.social-icons {
  gap: 15px;
}

/* ========== UMKM DETAIL ========== */
.umkm-detail {
  display: flex;
  gap: 30px;
  background: #fff;
  border: 2px solid var(--color-dark-green) !important;
  border-radius: 10px;
  padding: 20px;
  flex-wrap: wrap;
}

.umkm-image {
  flex: 1;
}

.main-img {
  width: 70px;
  height: 250px;
  border-radius: 8px;
  object-fit: cover;
}

.umkm-thumbnail {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.umkm-thumbnail img {
  width: 70px;
  height: 70px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid #ccc;
}

.umkm-info {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.umkm-title {
  margin: 0;
  font-size: 1.8rem;
}

.umkm-price {
  font-weight: bold;
  font-size: 1.3rem;
  margin: 10px 0;
}

.umkm-desc {
  margin-bottom: 20px;
  text-align: justify;
}

.umkm-thumbnail .thumbnail-img {
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
  border-radius: 5px;
  opacity: 0.7;
}

.umkm-thumbnail .thumbnail-img:hover {
  opacity: 1;
}

.umkm-thumbnail .thumbnail-img.active {
  border-color: var(--color-brown);
  opacity: 1;
}

.umkm-info .btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 8px 8px;
  background: #25d366;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 30%;
}

.btn-wa:hover {
  background: #1ebe5d;
}

.btn-wa i {
  font-size: 19px;
  margin-right: 5px;
}

/* Video */
.video-section {
  margin-top: 30px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
}

.video-title {
  margin-bottom: 15px;
}

.video-section iframe {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  border: none;
}

/* Footer */
footer {
  background: #f2f5c8;
  padding: 20px;
  font-size: 0.9em;
  color: #333;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 5px;
}

footer div {
  margin: 5px;
  max-width: 250px;
}

.site-footer {
  background-color: var(--color-light-yellow);
  color: #333;
  padding: 12px 20px; /* lebih pendek */
  display: flex;
  align-items: center; /* sejajar tengah */
  justify-content: center; /* center horizontal */
  gap: 60px; /* jarak antar kolom */
  font-size: 14px;
  line-height: 1.4; /* rapetin line */
}

/* Bagian logo + teks pemerintah */
.footer-left {
  display: flex;
  align-items: center; /* logo & teks sejajar vertikal */
  gap: 15px; /* jarak logo dan teks */
  max-width: 450px; /* bikin lebih lebar */
}

.footer-left img.logo {
  width: 70px; /* logo cukup */
  height: auto;
}

.footer-left .footer-text {
  text-align: left;
  max-width: 350px; /* teks bisa melebar */
}

.footer-section {
  text-align: left;
}

.footer-left .footer-text h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
}

.footer-left .footer-text p {
  margin: 3px 0;
  line-height: 1.4;
}

.footer-section a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #70856d;
}

.icon-footer {
  display: flex;
  align-items: center;
  margin-bottom: 5px; /* lebih rapat */
}

.social-media-links a {
  font-size: 24px; /* Atur ukuran ikon */
  color: #333; /* Atur warna ikon */
  margin: 0 10px; /* Beri jarak antar ikon */
}

.wadah-tombol {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
}

.tombol-ikon {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  font-size: 16px;
  color: white;
  background-color: #c49166;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.tombol-ikon i {
  margin-right: 8px;
}

.tombol-ikon:hover {
  background-color: #70856d;
}

/* PROFILE DESA*/
.profil {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 5px;
}

.profil-text {
  flex: 1;
  margin-right: 45px;
}

.profil-img img {
  max-width: 500px;
  border-radius: 15px;
}

/* Visi Misi */
.visi-misi {
  background-color: #d7edc4;
  border-radius: 20px;
  margin: 40px auto;
  padding: 40px 20px;
  max-width: 1000px;
}

.visi-misi h3 {
  text-align: center;
  margin-bottom: 15px;
}

.card {
  background-color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  margin: 20px auto;
  max-width: 700px;
  text-align: center;
}

.kisah-section {
  padding: 20px 0px;
  max-width: 1000px;
  text-align: center;
  border-radius: 8px;
  margin: 0 auto; /* Pusatkan kontainer di tengah halaman */
  padding: 0 20px;
}

.kisah-section h2 {
  margin-bottom: 40px;
  font-size: 2rem;
}

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  margin: 30px 30px 0 30px;

  padding: 12px 25px;
  background-color: var(--color-light-yellow);
  color: var(--color-brown);
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  border: 2px solid var(--color-brown);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.btn-download:hover {
  background-color: var(--color-light-green); /* Warna cokelat sedikit lebih gelap saat hover */
  transform: translateY(-2px);
}

.btn-download i {
  font-size: 18px;
}

/* Video Frame */
.video-frame {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
  border-radius: 15px;
  background: var(--color-light-yellow);
  max-width: 1100px;
  margin: 0 auto;
}

.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Peta */
#peta {
  background-color: #5b7052;
  padding: 40px 20px;
  text-align: center;
  border-radius: 12px;
  margin: 40px auto;
  max-width: 900px;
}

#peta h2 {
  color: white;
  margin-bottom: 20px;
}

.map-frame {
  display: flex;
  justify-content: center;
}

.map-frame iframe {
  width: 80%;
  height: 350px;
  border: 3px solid white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Detail UMKM */
.umkm-detail {
  display: flex;
  gap: 30px;
  background: #fff;
  border: 2px solid #2f80ed;
  border-radius: 10px;
  padding: 20px;
  flex-wrap: wrap;
}

.umkm-image {
  flex: 1;
}

.main-img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.umkm-thumbnail {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.umkm-thumbnail img {
  width: 70px;
  height: 70px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid #ccc;
}

.umkm-info {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.umkm-title {
  margin: 0;
  font-size: 1.8rem;
}

.umkm-price {
  font-weight: bold;
  font-size: 1.3rem;
  margin: 10px 0;
}

.umkm-desc {
  margin-bottom: 20px;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #25d366;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  width: 30%;
}

.btn-wa:hover {
  background-color: #1ebe5b;
}

/* Video */
.video-section {
  margin-top: 30px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
}

.video-title {
  margin-bottom: 15px;
}

.video-section iframe {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  border: none;
}

/* Footer */
footer {
  background: #f2f5c8;
  padding: 20px;
  font-size: 0.9em;
  color: #333;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 5px;
}

footer div {
  margin: 5px;
  max-width: 250px;
}

.icon-footer i {
  margin-right: 8px; /* Memberi jarak 10px di sebelah kanan ikon */
}

/* ================= STRUKTUR PEMERINTAHAN DESA ================= */
.staff-section {
  background: var(--color-light-yellow);
  padding: 40px 20px;
  border-radius: 10px;
  max-width: 1200px;
  margin: 40px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.staff-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #333;
}

/* RW Group */
.rw-group {
  margin-bottom: 50px;
  text-align: center;
}

.official-card.rw {
  background: var(--color-light-green);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 220px;
  margin: 0 auto 20px auto;
}

.official-card.rw .name {
  font-size: 18px;
  font-weight: 700;
  margin-top: 10px;
}

.official-card.rw .title {
  font-size: 14px;
  color: #555;
}

/* RT Grid di bawah RW */
.rt-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-top: 20px;
}

.official-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  width: 100%;
  max-width: 180px;
}

.official-card:hover {
  transform: translateY(-5px);
}

.official-card .profile-picture {
  width: 100px;
  height: 100px;
  background: #e0e0e0;
  border-radius: 50%;
  margin: 0 auto 10px;
}

.official-card .name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.official-card .title {
  font-size: 13px;
  color: #666;
}

/* ========== MEDIA QUERIES (RESPONSIVITAS) ========== */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    transform: none;
    left: 10px;
    right: 10px;
    width: auto;
    justify-content: space-between;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    width: 50%;
    left: 75%;
    background-color: var(--color-light-yellow);
    opacity: 95%;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
    list-style: none;
    text-align: center;
    transform: translateX(-50%);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    margin: 10px 0;
    text-align: center;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
  }

  .menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-dark-green);
    transition: all 0.3s ease-in-out;
  }

  /* Carousel dan Hero Section */
  .hero h2 {
    font-size: 1.5rem;
    margin-top: 20%;
  }

  .hero-desc {
    font-size: 0.9rem;
  }

  .carousel-container {
    width: 100%;
    margin: 20px 0; /* Ganti margin horizontal menjadi 0 */
    overflow-x: scroll;
    overflow-y: hidden;
    display: flex;
    /* Hapus gap di sini, kita akan gunakan margin di carousel-item */
    gap: 0;
    scroll-snap-type: x mandatory;
    padding: 0; /* Hapus padding agar tidak ada overflow */
  }

  .carousel-track {
    display: flex;
    padding-left: 20px; /* Tambahkan padding di sini untuk ruang di kiri */
    padding-right: 20px;
  }

  .carousel-item {
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    /* Gunakan margin di sini untuk membuat jarak antar item */
    margin-right: 15px;
  }

  /* Ukuran untuk gambar kecil */
  .carousel-item.small {
    width: 250px;
    height: 250px;
    margin-top: 25px;
  }

  /* Ukuran untuk gambar besar */
  .carousel-item.large {
    width: 300px;
    height: 300px;
  }

  /* Gambar isi penuh kotak */
  .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Sections */
  .card-container,
  .deskripsi-card,
  .sejarah-budaya-container,
  .head-official-container {
    flex-direction: column;
    text-align: center;
  }

  .card-container .card {
    min-width: auto;
    width: 100%;
  }

  .deskripsi-text {
    text-align: center;
  }

  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-section {
    text-align: center;
  }

  .contact-item {
    justify-content: center;
  }

  .sejarah-card {
    flex-direction: column;
    text-align: center;
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }

  .sejarah-card.reverse {
    flex-direction: column;
  }

  .sejarah-card .card-text {
    text-align: center;
  }

  .sejarah-card .card-text h2 {
    text-align: center;
  }

  /* UMKM (Digabungkan) */
  .video-grid {
    flex-direction: column;
    align-items: center;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Responsif Umum untuk Profil, Galeri, Video, dan Peta */
  .main-content-profile {
    padding: 20px;
  }

  .profil {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .profil-text {
    order: 2;
    text-align: justify;
  }

  .profil-img {
    order: 1;
    width: 100%;
    max-width: 600px;
    height: auto;
  }

  .profil-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .container {
    max-width: 800px;
    margin-bottom: 20px;
  }

  .card {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .gallery {
    text-align: center;
    padding: 40px 20px;
  }

  .slider-container {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 15px;
  }

  .slider {
    display: inline-flex;
    gap: 20px;
    padding: 0 20px;
  }

  .slider img {
    width: 80vw;
    height: 60vw;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .map-frame {
    position: relative;
    width: 100%;
    padding-top: 75%;
    max-width: 800px;
    margin: 0 auto;
  }

  .map-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
  }

  .back-button-side {
    display: none;
  }

  .profil {
    flex-direction: column;
    align-items: center;
  }

  .profil-text {
    flex: none;
    order: 2;
    padding: 0 10px;
    text-align: justify;
    margin-left: 40px;
    width: 100%;
  }

  .profil-img {
    flex: none;
    order: 1;
    width: 100%;
    max-width: 500px;
    height: auto;
  }

  .sejarah-card {
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
  }

  /* Mengatur ulang lebar dan tinggi gambar agar responsif */
  .sejarah-card .placeholder-image {
    width: 300px;
    height: 200px;

    background-color: #dcdcdc;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
  }

  /* Memastikan gambar mengisi penuh kontainer */
  .sejarah-card .placeholder-image img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .umkm-detail {
    flex-direction: column;
    text-align: center;
  }

  .umkm-thumbnail {
    justify-content: center;
  }

  .btn-wa {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .video-section iframe {
    height: 250px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .btn-download {
    margin: 30px 10px 0 10px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .umkm-thumbnail img {
    width: 60px;
    height: 60px;
  }

  .video-section iframe {
    height: 200px;
  }

  .umkm-thumbnail img {
    width: 60px;
    height: 60px;
  }

  .video-section iframe {
    height: 200px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .staff-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
